from django.db import models

# Create your models here.


class School(models.Model):
    name=models.CharField(max_length=20)
    is_have=models.BooleanField(default=True)
    start_time=models.DateField(default='2019-09-20')
    end_time=models.DateField(default='2019-09-30')
    is_on=models.BooleanField(default=True)
    class Meta:
        db_table='school2'


class Activity(models.Model):
    number=models.CharField(max_length=20)
    title=models.CharField(max_length=20)
    school=models.ForeignKey(School,on_delete=models.CASCADE)
    class Meta:
        db_table='activity2'